A charging system, located between a service processing node as well as a service analysis system and a charging center, is used for processing of converting and combining service logs, encoding record serial numbers and file serial numbers of the service logs, or the like, so as to generate a phone bill in a designated format and offer the same to the service analysis system and the charging center. The so-called service log records the tracks of a communication system user in a communication system, containing all the information derived from using the communication system by the user, which generally comprises information for charging and service analysis such as a user, service starting time, service ending time, etc.
As the service processing nodes are increased, requirements for the phone bill processing capability of the charging system are increasingly high. Moreover, the complexity of processing the record serial numbers and the file serial numbers of the phone bill is greatly increased.
Processing the phone bill is currently performed in a multithread parallel processing manner. The service logs are processed by each thread to generate one or more kinds of phone bill(s). All the threads use a share lock to read and write the record serial numbers and the file serial numbers of the phone bills or share to read and write output phone bills. Since the share lock is used to control, unrecoverable difficulties arise when a system is abnormal, viz. when the system is abnormal, it is difficult to recover the record serial numbers and the file serial numbers of the phone bills and to recover the output phone bills. In this case, a part of the phone bills could only be discarded to recover the system.